package com.TheyChat.service.controller;

import com.TheyChat.service.config.auth.Authentication;
import com.TheyChat.service.config.auth.NoneAuthCheck;
import com.TheyChat.service.interfaces.dto.LoginRequest;
import com.TheyChat.service.interfaces.service.IUserService;
import com.TheyChat.service.interfaces.vo.LoginVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("user")
@Api(tags = "用户api")
public class UserController {
    @Resource
    private IUserService userService;

    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }

    @PostMapping("login")
    @ApiOperation("登陆")
    public LoginVO login(@RequestBody LoginRequest request){
        return userService.login(request);
    }
}
